/**
 * 
 */
package br.com.model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

	@Entity
	@Table(name = "tb_ajzt_cao_opr_seld_cmco_ogmx")
	@XmlRootElement
	@NamedQueries({
	    @NamedQuery(name = "TbAjztCaoOprSeldCmcoOgmx.findAll", query = "SELECT t FROM TbAjztCaoOprSeldCmcoOgmx t"),
	    @NamedQuery(name = "TbAjztCaoOprSeldCmcoOgmx.findByIdCmcoOgm", query = "SELECT t FROM TbAjztCaoOprSeldCmcoOgmx t WHERE t.idCmcoOgm = :idCmcoOgm"),
	    @NamedQuery(name = "TbAjztCaoOprSeldCmcoOgmx.findByCtlMsgCmcoAno", query = "SELECT t FROM TbAjztCaoOprSeldCmcoOgmx t WHERE t.ctlMsgCmcoAno = :ctlMsgCmcoAno"),
	    @NamedQuery(name = "TbAjztCaoOprSeldCmcoOgmx.findByCtlMsgCmco", query = "SELECT t FROM TbAjztCaoOprSeldCmcoOgmx t WHERE t.ctlMsgCmco = :ctlMsgCmco"),
	    @NamedQuery(name = "TbAjztCaoOprSeldCmcoOgmx.findByDtPz", query = "SELECT t FROM TbAjztCaoOprSeldCmcoOgmx t WHERE t.dtPz = :dtPz"),
	    @NamedQuery(name = "TbAjztCaoOprSeldCmcoOgmx.findByCdChvUsuReg", query = "SELECT t FROM TbAjztCaoOprSeldCmcoOgmx t WHERE t.cdChvUsuReg = :cdChvUsuReg"),
	    @NamedQuery(name = "TbAjztCaoOprSeldCmcoOgmx.findByObs", query = "SELECT t FROM TbAjztCaoOprSeldCmcoOgmx t WHERE t.obs = :obs"),
})
	public class TbAjztCaoOprSeldCmcoOgmx implements Serializable {

	    private static final long serialVersionUID = 1L;
	    
	    @Id
	    @GeneratedValue
	    @Basic(optional = false)
	    @Column(name = "id_cmco_ogm")
	    private Integer idCmcoOgm;
	    
	    @Column(name = "ctl_msg_cmco_ano")
	    private Integer ctlMsgCmcoAno;	    
	        
	    @Column(name = "ctl_msg_cmco")
	    private String ctlMsgCmco;
	    
	    @Column(name = "dt_envo_msg_cmco")
	    @Temporal(TemporalType.DATE)
	private Date dtEnvoMsgCmco;
	   	    
	    public Date getDtEnvoMsgCmco() {
			return dtEnvoMsgCmco;
		}

		public void setDtEnvoMsgCmco(Date dtEnvoMsgCmco) {
			this.dtEnvoMsgCmco = dtEnvoMsgCmco;
		}

		@Column(name = "dt_pz")
	    @Temporal(TemporalType.DATE)
	    private Date dtPz;
	    
	    @Column(name = "cd_chv_usu_reg")
	    private String cdChvUsuReg;	    
	    	    
	    @Column(name = "obs")
	    private String obs;   	  
	   	    
	    @JoinColumn(name = "cd_tp_cmco", referencedColumnName = "cd_tp_cmco")
	    @ManyToOne
	    private TbConstTpCmcoOgm cdTpCmco;	    
	   
	    public TbAjztCaoOprSeldCmcoOgmx() {
	    }

	    public TbAjztCaoOprSeldCmcoOgmx(Integer idCmcoOgm) {
	        this.idCmcoOgm = idCmcoOgm;
	    }

	    public Integer getIdCmcoOgm() {
	        return idCmcoOgm;
	    }

	    public void setIdCmcoOgm(Integer idCmcoOgm) {
	        this.idCmcoOgm = idCmcoOgm;
	    }

	    public Integer getCtlMsgCmcoAno() {
	        return ctlMsgCmcoAno;
	    }

	    public void setCtlMsgCmcoAno(Integer ctlMsgCmcoAno) {
	        this.ctlMsgCmcoAno = ctlMsgCmcoAno;
	    }

	    public String getCtlMsgCmco() {
	        return ctlMsgCmco;
	    }

	    public void setCtlMsgCmco(String ctlMsgCmco) {
	        this.ctlMsgCmco = ctlMsgCmco;
	    }	   

	    public Date getDtPz() {
	        return dtPz;
	    }

	    public void setDtPz(Date dtPz) {
	        this.dtPz = dtPz;
	    }

	    public String getCdChvUsuReg() {
	        return cdChvUsuReg;
	    }

	    public void setCdChvUsuReg(String cdChvUsuReg) {
	        this.cdChvUsuReg = cdChvUsuReg;
	    }
	  
	    public String getObs() {
	        return obs;
	    }

	    public void setObs(String obs) {
	        this.obs = obs;
	    }

	     public TbConstTpCmcoOgm getCdTpCmco() {
	        return cdTpCmco;
	    }

	    public void setCdTpCmco(TbConstTpCmcoOgm cdTpCmco) {
	        this.cdTpCmco = cdTpCmco;
	    }
   
	    @Override
	    public int hashCode() {
	        int hash = 0;
	        hash += (idCmcoOgm != null ? idCmcoOgm.hashCode() : 0);
	        return hash;
	    }

	    @Override
	    public boolean equals(Object object) {

	        if (!(object instanceof TbAjztCaoOprSeldCmcoOgmx)) {
	            return false;
	        }
	        TbAjztCaoOprSeldCmcoOgmx other = (TbAjztCaoOprSeldCmcoOgmx) object;
	        if ((this.idCmcoOgm == null && other.idCmcoOgm != null) || (this.idCmcoOgm != null && !this.idCmcoOgm.equals(other.idCmcoOgm))) {
	            return false;
	        }
	        return true;
	    }

	    @Override
	    public String toString() {
	        return "db.pojo.TbAjztCaoOprSeldCmcoOgmx[ idCmcoOgm=" + idCmcoOgm + " ]";
	    }
	}
